/*
   Copyright (C) 2009 Hugh Nelson.
   This file is part of Libbarteta.

   Libbarteta is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   Libbarteta is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with Libbarteta.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>

#include "barteta.h"

int main( void )
{
   barteta_handle bh = barteta_getHandle();
   barteta_getData( bh );
   barteta_station* station = barteta_getStation( bh, "19TH" );
   
   printf( "BART train info for the %s station.  %s, %s\n",
	station->name, station->date, station->time );
   
   int curr;

   for( curr = 0; curr < station->numDests; curr++ )
   {
      printf( "%s: %s\n", station->dests[ curr ]->name, 
	    station->dests[ curr ]->estimates );
   }

   barteta_releaseStation( station );
   barteta_releaseHandle( bh );

   return 0;
}
